package com.financing.wap.web.controller.api;



import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.financing.wap.common.Pager;
import com.financing.wap.common.ResultMap;
import com.financing.wap.common.ResultMap.STATUS;
import com.financing.wap.dto.NewsDTO;
import com.financing.wap.dto.TagNewsDTO;
import com.financing.wap.dto.TagProductDTO;
import com.financing.wap.service.ISystemService;
import com.financing.wap.vo.QueryNewsVo;
import com.financing.wap.vo.TagRelateVo;
import com.financing.wap.web.controller.BaseController;

/**
 * 资讯类
 * @author Marco
 *
 */
@Controller("platformMonthRebateController")
@RequestMapping("/api")
public class PlatformMonthRebateController  extends BaseController{

	Logger logger = Logger.getLogger(getClass());



	@Autowired
	private ISystemService systemService;
	/**
	 * 资讯列表
	 * @return
	 */
	@RequestMapping("/pmr")
	@ResponseBody
	public ResultMap list(HttpServletRequest request, HttpServletResponse response,QueryNewsVo queryVo){
		ResultMap result = new ResultMap();
		try {
			result.setAttribute("platformMonthRebate", systemService.getPlatformMonthRebate());
			result.setStatus(STATUS.SUCCESS);
			result.setStatusCode(ResultMap.STATUS_CODE_SUCCESS);
		} catch (Exception e) {
			logger.warn("==>warn messang:",e);
			result.setStatus(STATUS.WARN);
			result.setStatusCode(ResultMap.STATUS_CODE_SYS_EXCEPTION);
		}
		return  result;
	}
	
}
